netfilter: nf_tables: stricter validation of element data
authorPablo Neira Ayuso <pablo@netfilter.org>
Sat, 2 Jul 2022 02:16:30 +0000 (04:16 +0200)
committerBen Hutchings <benh@debian.org>
Sat, 23 Jul 2022 22:32:10 +0000 (23:32 +0100)
commitf6d643f2a64f30520b80a1fbc89b4d5e9f619ae7
treea455e54fe8d392ed48dfe872495b29c0720485e3
parent08613d4fe8aa2df9d57e706e87339886093863f6
netfilter: nf_tables: stricter validation of element data

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=0a5e36dbcb448a7a8ba63d1d4b6ade2c9d3cc8bf
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-34918

commit 7e6bc1f6cabcd30aba0b11219d8e01b952eacbb6 upstream.

Make sure element data type and length do not mismatch the one specified
by the set declaration.

Fixes: 7d7402642eaf ("netfilter: nf_tables: variable sized set element keys / data")
Reported-by: Hugues ANGUELKOV <hanguelkov@randorisec.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name netfilter-nf_tables-stricter-validation-of-element-d.patch
net/netfilter/nf_tables_api.c